/**
 * 配置信息
 * by blue
 *
 * 上线步骤：
 *  1、检查地址状态，使用正式地址，
 *  2、检查引用 flash 地址
 *  3、清缓存
 *  4、刷新查看代码
 */
fangimjs.define("setting/setting", [], function(require, exports, module) {
    "use strict";
    var settingSingle = (function() {
        function Setting(args) {
            /*初始化数据*/
            this.POLLING_INTERVAL = 40000; //长轮询时间间隔
            this.ONLINE_STATE_SEARCH_INTERVAL = 120000; //在线
            //测试地址
            // this.ONLINE_PATH="http://testchat.client.3g.fang.com/OnLine";
            // this.LONG_POLLING_SERVER='http://webim.client.3g.test.fang.com/';
            //正式地址
            this.ONLINE_PATH = "http://chat.client.3g.fang.com/OnLine";
            this.LONG_POLLING_SERVER = 'http://webim.client.3g.fang.com/';
            this.SWF_FILE = 'swf/webim2.0.6.swf';
            // 进行本地调试，使用的 swf
            // this.SWF_FILE = 'swf/WebSocketIM.swf';

            // 长连接地址
            this.LONG_CONNECT_REQUEST_PATH = this.LONG_POLLING_SERVER + "longPolling";
            this.AJAX_PROXY_PATH = this.LONG_POLLING_SERVER + "ajaxproxy.html";

            this.JIAJU_AUTO_REPLY_PATH = "http://home.fang.com/jiancai/interface/DealerReplyJquery.aspx"; //?username=&callback=
            this.UPLOAD_IMG_PATH = "http://img1u.soufun.com/upload/mchat?channel=webim&city="; //http://img1u.soufun.com/upload/secondhouse?channel=mall.pic&city=&kind=houseinfo";
            // this.UPLOAD_IMG_BACK_URL_PATH = "http://m.fang.com/bbs/uploadimgcallback.php"; // https 跨域，注释掉
            this.UPLOAD_IMG_BACK_URL_PATH = "http://activities.m.fang.com/im/?c=imchat";
            /*窗口状态*/
            this.WINDOW_STATUS_MAX = "max"; //显示全部窗口
            this.WINDOW_STATUS_MAIN = "main"; //右侧联系人窗口显示
            this.WINDOW_STATUS_MIN = "min"; //只显示联系人按钮
            this.WINDOW_STATUS_TINY = "tiny"; //默认预留
            this.WINDOW_STATUS_CLOSE = "close"; //关闭所有窗口
            /* 联系人类型 */
            this.CONTACT_RECENT = "recent"; //最近联系人
            this.CONTACT_CONSULTANT = "consultant"; //置业顾问
            this.CONTACT_BROKER = "broker"; //经纪人
            this.CUSTOMER_SERVICE = "customerService"; //经纪人
            /*显示最大消息数*/
            this.MAX_MSG_NUM = 30;

            /* type: 页面接口传递的集团类型，新房 webxf ，二手房 webesf ，租房 agent ，家居 home ，海外 world */
            // yf: 添加到配置中，统一管理。
            this.type = {
                xf: 'webxf',
                esf: 'webesf',
                zf: 'agent',
                jiaju: 'home',
                haiwai: 'world',
                sfb: 'sfb',
                zxb: 'zxb'
            };
        }
        var instance;
        var _static = {
            name: 'settingSingle',
            getInstance: function(args) {
                if (instance === undefined) {
                    instance = new Setting(args);
                }
                return instance;
            }
        };
        return _static;
    })();
    module.exports = settingSingle;
});
